import App from "./App"
// 引入 uView UI
import uView from './uni_modules/vk-uview-ui';

// import devTools from "./devTools/index.js";
// import devToolsConfig from './devTools/config.js';
// import mpDevBubble from './devTools/core/components/mpDevBubble.vue'
// import devToolsVueMixin from "./devTools/core/proxy/vueMixin.js"

// #ifndef VUE3
import Vue from "vue"
import "./uni.promisify.adaptor"
Vue.config.productionTip = false
App.mpType = "app"

const app = new Vue({
	...App,
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from "vue"

import * as Pinia from "pinia";

import {
	createUnistorage
} from "./uni_modules/pinia-plugin-unistorage";
// import DragButton from '@/components/dragon-dragButton/index.vue'

export function createApp() {
	const app = createSSRApp(App)

	const store = Pinia.createPinia();

	store.use(createUnistorage());

	// 使用 uView UI
	app.use(uView).use(store)

	// app.component("drag-button", DragButton)

	// //混入DevTools生命周期监听
	// app.mixin(devToolsVueMixin)
	// //挂载Devtools
	// app.use(devTools, devToolsConfig)
	// //注册小程序端专用的拖动浮标组件
	// app.component("mpDevBubble", mpDevBubble)

	return {
		app,
		Pinia, // 此处必须将 Pinia 返回
	}
}
// #endif